unit warningDialog;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls;

type
  TWarnDialog = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    Bevel1: TBevel;
    StaticText1: TStaticText;
  private
    { Private declarations }
  public
    { Public declarations }
    class function ShowQuestion(const question: string): TModalResult;
  end;

implementation

var
  WarnDialog: TWarnDialog;

{$R *.dfm}

{ TWarnDialog }

class function TWarnDialog.ShowQuestion(const question: string): TModalResult;
begin
  WarnDialog := TWarnDialog.Create(nil);
  try
    WarnDialog.StaticText1.Caption := question;
    result := WarnDialog.ShowModal;
  finally
    WarnDialog.Free;
  end;
end;

end.
